<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;
header('Access-Control-Allow-Origin: *');
header('Access-Control-Max-Age: 1800');
header('Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE');
header('Access-Control-Allow-Headers: Api-Auth,Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-CSRF-TOKEN, X-Requested-With');
Route::get('think', function () {
    return 'hello,ThinkPHP6!';
});
Route::rule('','index.Login/index');
Route::get('test','index.Index/test');
Route::rule('web','Index/web');
Route::rule('url/:url','Index/home');
Route::rule('hello','Index/hello');
Route::rule('qipei','Index/get_data');
Route::rule('qipei_index','Index/_index');
Route::post('image','Upload/image');
Route::rule('phone','phone.Index/index');
Route::get('email','Index/email');
//Route::rule('mobile/login',function(){
//    return 'hello,ThinkPHP6!';
//});
Route::rule('mobile/login','phone.Login/login');
Route::group('admin',function (){
    Route::get('login','admin.Login/sign');
    Route::post('login','admin.Login/login');
    Route::rule('unlogin','admin.Login/unlogin');
    Route::rule('index/:name','admin.Index/index');
    Route::group('customer',function (){
        Route::rule('list','list');
        Route::rule('info','info');
        Route::rule('save','save');
        Route::rule('delete','delete');
    })->prefix('admin.Customer/');
    Route::group('user',function(){
        Route::rule('list','list');
        Route::rule('info','info');
        Route::post('save','save');
        Route::rule('keyword','keyword');
        Route::rule('delete','delete');
    })->prefix('admin.User/');
    Route::group('keyword',function(){
        Route::rule('list','list');
        Route::rule('save','save');
        Route::rule('saves','saveAll');
        Route::rule('baidu','baidu');
        Route::rule('del','del');
    })->prefix('admin.Keyword/');
    Route::group('config',function(){
        Route::rule('list','list');
    })->prefix('admin.Config/');
    Route::group('order',function(){
        Route::rule('list','list');
        Route::rule('info','info');
        Route::post('save','save');
    })->prefix('admin.Order/');
    Route::group('bangmang',function(){
        Route::rule('index','index');
        Route::rule('yuanqu','yuanqu');
        Route::rule('yemian','yemian');
    })->prefix('admin.Bangmang/');
    Route::group('monitor',function(){
        Route::rule('monitor','monitor');
        Route::rule('keyword','keyword');
        Route::rule('website','website');
    })->prefix('admin.Monitor/');
});
Route::group('index',function (){
    Route::rule('out','index.Login/out');
    Route::rule('index','index.Index/index');
    Route::rule('google','index.Keyword/google');
    Route::rule('login','index.Login/index');
    Route::rule('register','index.Login/register');
    Route::rule('config','index.Index/config');
    Route::rule('product','index.Index/product');
    Route::group('deepseek',function (){
        Route::rule('info','info');
        Route::rule('message','message');
    })->prefix('index.Deepseek/');
    Route::group('amount',function(){
       Route::rule('list','list');
    })->prefix('index.Amount/');
    Route::group('project',function (){
       Route::rule('list','list');
       Route::rule('info','info');
       Route::rule('save','save');
       Route::rule('del','del');
    })->prefix('index.Project/');
    Route::group('history',function(){
        Route::rule('keyword','keyword');
    })->prefix('index.History/');
    Route::group('customer',function(){
        Route::rule('list','list');
        Route::rule('info','info');
        Route::post('save','save');
        Route::rule('del','del');
    })->prefix('index.Customer/');
    Route::group('keyword',function (){
        Route::rule('info','info');
        Route::rule('all','list');
        Route::rule('setmenu','setmenu');
        Route::rule('list','keywords_list');
        Route::rule('total','total_price');
        Route::post('get_price','get_price');
        Route::rule('order_create','order_create');
        Route::rule('baidu','baidu');
        Route::rule('douyin','douyin');
        Route::group('order',function(){
            Route::rule('create','order_save');
            Route::rule('list','order_list');
        });
    })->prefix('index.Keyword/');
    Route::group('users',function(){
        Route::rule('del','del');
        Route::rule('count','count');
        Route::rule('list','list');
        Route::rule('info','info');
        Route::post('save','save');
        Route::post('create','create');
    })->prefix('index.Users/');
    Route::group('user',function (){
        Route::rule('find','find');
        Route::rule('list','list');
        Route::rule('info','info');
        Route::rule('save','save');
        Route::rule('status/:id/:status','status');
        Route::rule('keywords','keywords');
        Route::rule('password','password');
        Route::rule('del_keyword','del_keyword');
        Route::rule('set_status','set_status');
    })->prefix('index.User/');
    Route::group('order',function(){
        Route::rule('pay','pay');
        Route::rule('pdf','pdf');
        Route::rule('info','info');
        Route::rule('find','find');
        Route::rule('list','list');
        Route::rule('save','save');
        Route::rule('total','total');
        Route::rule('setmenu_create','setmenu_create');
        Route::rule('save_amount','save_amount');
        Route::rule('save_hetong_corporate_name','save_hetong_corporate_name');
    })->prefix('index.Order/');
    Route::group('web',function (){
        Route::rule('list','list');
        Route::rule('info','info');
        Route::post('save','save');
        Route::rule('del','del');
    })->prefix('index.Web/');
});
Route::group('home',function (){
    Route::rule('index','home.Index/index');
    Route::rule('html','home.Index/html');
    Route::rule('content','home.Index/info');
    Route::group('config',function (){
        Route::rule('web','web');
    })->prefix('home.Index/');
    Route::group('list',function(){
        Route::rule('web','web');
        Route::rule('nav','nav');
        Route::rule('info','info');
    })->prefix('home.Lists/');
    Route::group('info',function(){
        Route::rule('web','web');
        Route::rule('nav','nav');
        Route::rule('info','info');
    })->prefix('home.Info/');
});
Route::get('hello/:name', 'index/hello');
Route::rule('code','sms/code');
Route::post('upload','upload/upload');
Route::rule('v_code','sms/v_code');
Route::rule('send','sms/send');
Route::rule('callback','callback/pay_callback');
Route::rule('address','/index/address');
Route::miss(function(){
    return "路径错误";
});